﻿@namespace MudBlazor.Internal



<div class="@Class">
    @if (!string.IsNullOrWhiteSpace(Text))
    {
        <MudText Color="@Color">@Text</MudText>
    }
    else if (!string.IsNullOrWhiteSpace(Icon))
    {
        @if (AdornmentClick.HasDelegate)
        {
            <MudIconButton Icon="@Icon" OnClick="@AdornmentClick" Edge="@Edge" Size="@Size" Color="@Color" />
        }
        else
        {
            <MudIcon Icon="@Icon" Size="@Size" Color="@Color"/>
        }
    }
</div>


@code {
    [Parameter] public string Class { get; set; }
    [Parameter] public string Text { get; set; }
    [Parameter] public string Icon { get; set; }
    [Parameter] public Edge Edge { get; set; }
    [Parameter] public Size Size { get; set; } = Size.Medium;
    [Parameter] public Color Color { get; set; } = Color.Default;

    [Parameter] public EventCallback<MouseEventArgs> AdornmentClick { get; set; }
}
